<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/template/common/header.jsp"%>
<div class="pageContent">
	<table class="table" width="100%" layoutH="50">
		<thead>
			<tr>
				<th width="80">内容</th>
				<th width="20">发布者</th>
				<th width="20">创建时间</th>
				<th width="20">操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${comments}" var="comment">
				<tr target="comment" rel="${comment.id}">
					<td><c:choose>
							<c:when test="${fn:length(comment.content) > 200}">
								<c:out value="${fn:substring(comment.content, 0, 200)}......" />
							</c:when>
							<c:otherwise>
								<c:out value="${comment.content}" />
							</c:otherwise>
						</c:choose></td>
					<td>${comment.member.name }</td>
					<td><fmt:formatDate value="${comment.createDate }"
							pattern="yyyy-MM-dd HH:mm:ss" /></td>
					<td><a title="确定要删除该评论?" target="ajaxTodo"
						href="${base }/article!commentDelete.action?comment.id=${comment.id}"
						class="btnDel">关闭</a></td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
</div>
<cy:pagination pageBean="${pager }" targetType="dialog"
	pageUrl="${base }/article!commentList.action?article.id=${article.id}">
	<%@include file="/WEB-INF/template/common/pagination.jsp"%>
</cy:pagination>